import screenfull from 'screenfull'
var global = tinymce.util.Tools.resolve('tinymce.PluginManager')

var register = function(editor) {
  editor.addCommand('mcePreview', () => {
    const cont = document.querySelector('#cont')
    screenfull.request(cont)
  })
}
var Commands = { register: register }

var register$1 = function(editor) {
  editor.ui.registry.addButton('preview', {
    icon: 'preview',
    tooltip: 'Preview',
    onAction: function() {
      return editor.execCommand('mcePreview')
    }
  })
  editor.ui.registry.addMenuItem('preview', {
    icon: 'preview',
    text: 'Preview',
    onAction: function() {
      return editor.execCommand('mcePreview')
    }
  })
}
var Buttons = { register: register$1 }

function Plugin() {
  global.add('preview', function(editor) {
    Commands.register(editor)
    Buttons.register(editor)
  })
}

Plugin()
